package com.vegetable.modules.entity.finance;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.vegetable.common.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 资金转账
 * </p>
 *
 * @author wangruijie
 * @since 2024-04-15
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="FinancialTransfer对象", description="资金转账")
public class FinancialTransfer extends BaseEntity {

    @ApiModelProperty(value = "生产者ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long producerId;

    @ApiModelProperty(value = "单据编号")
    private String docNo;

    @ApiModelProperty(value = "账户转入id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long accountInId;

    @ApiModelProperty(value = "账户转入名称")
    private String accountInName;

    @ApiModelProperty(value = "账户转出id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long accountOutId;

    @ApiModelProperty(value = "账户转出名称")
    private String accountOutName;

    @ApiModelProperty(value = "销售金额")
    private BigDecimal money;

    @ApiModelProperty(value = "订单时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd")
    private Date orderTime;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "创建者ID")
    private Long createUserId;

    @ApiModelProperty(value = "创建时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd")
    private Date createTime;

}
